package com.cnt.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cnt.entity.DonationRecords;
import com.cnt.entity.MoneyLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MoneyLogDao extends BaseMapper<MoneyLog> {

    @Select("SELECT * FROM money_log WHERE YEAR(donation_time) = #{year} ")
    public List<MoneyLog> selectByYear(@Param("year") int year);
}
